//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Spreadsheet
{
    public abstract class Filter: IOfficeXmlSerializable
    {
        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            ReadXmlCore(context);
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            WriteXmlCore(context);
        }
        internal abstract void ReadXmlCore(ReadContext context);
        internal abstract void WriteXmlCore(WriteContext context);

        #endregion

        internal abstract bool GetValue(Cell cell, RangeAddress rangeAddress);

        internal abstract Func<Cell, bool> GetCellEvaluator(Range range);
    }
}
